package com.example.java2mysql.infrastructure;

import org.springframework.stereotype.Component;

import java.util.Random;
@Component
public class Randoms {

    private Random random = new Random();

    public Integer randomInteger(Integer a){
        return random.nextInt(a);
    }
    public synchronized String randomString(String prefix){
        String a = String.format("%06d",random.nextInt(1000000));
        return prefix+a;
    }

}
